﻿using System;
using System.Collections.Generic;
using NakedObjects;
using NakedObjects.Value;

namespace HRMDomain
{
    public class Document:Base
    {
        [Hidden]
        public virtual byte[] Data { get; set; }
        [Hidden]
        public virtual string MIMEType { get; set; }
        [Hidden, Title]
        public virtual string Name { get; set; }
        public virtual FileAttachment Attachment
        {
            get
            {
                if (Data == null) return null;
                return new FileAttachment(Data, Name, MIMEType);
            }
        }
    }
}
